home *** CD-ROM | disk | FTP | other *** search
- <WIZIF 0>
- <!-- Copyright (c) 1997-2001 Macromedia, Inc. All Rights Reserved. Consult Software License Agreement for more details. Version 1.0 - 2001-05-04 -->
- Input: var = variable to be tested
- Output: IsNumeric: boolean with value 'true' or 'false'
- </WIZIF>
-
- <WIZIF Mid(var,1,1) EQ '-'>
- <WIZSET IsNumeric = 'true'>
- <WIZELSE>
- <WIZSET CountLen = Len(Trim(var))>
- <WIZSET CharIndex = 1>
- <WIZLOOP CONDITION = 'CharIndex LTE CountLen'>
- <WIZSET IsNumeric = 'false'>
- <WIZSET Char = Mid(var,CharIndex,1)>
- <WIZLOOP INDEX=Digit LIST='1,2,3,4,5,6,7,8,9,0'>
- <WIZIF Char EQ Digit>
- <WIZSET IsNumeric = 'true'>
- <WIZBREAK>
- </WIZIF>
- </WIZLOOP>
- <WIZIF IsNumeric EQ 'false'>
- <WIZBREAK>
- </WIZIF>
- <WIZSET CharIndex = CharIndex + 1>
- </WIZLOOP>
- </WIZIF>
-